from rest_framework import serializers

from index.models import IndexPage, IndexDetails, IndexComment


class NewsSerializer(serializers.ModelSerializer):

    class Meta:
        model = IndexPage
        fields='__all__'

class CoAPIView(serializers.ModelSerializer):
    # category=serializers.FileField()
    # title=serializers.CharField()
    # abstract=serializers.CharField()
    # create_time=serializers.DateTimeField
    #
    class Meta:
        model = IndexDetails
        fields = ('id','title','abstract','create_time','content')

# class Commentserializer(serializers.ModelSerializer):
#     class Meta:
#         model = IndexComment
#         filter = ('id','parent','author','content','create_time')




